Skip to content

fix(huggingface_hub): stop setting transaction status on AI span errors#5864

Closed
NIK-TIGER-BILL wants to merge 1 commit intogetsentry:masterfrom
NIK-TIGER-BILL:fix/huggingface-hub-stop-setting-transaction-status
Closed

fix(huggingface_hub): stop setting transaction status on AI span errors#5864
NIK-TIGER-BILL wants to merge 1 commit intogetsentry:masterfrom
NIK-TIGER-BILL:fix/huggingface-hub-stop-setting-transaction-status

Conversation

@NIK-TIGER-BILL
Copy link

Description

AI integrations should not interfere with HTTP transactions.

_capture_exception() called set_span_errored() which propagated INTERNAL_ERROR to the containing HTTP transaction. Replace with get_current_span() + direct span.set_status() that only affects the AI span.

Changed files:

  • sentry_sdk/integrations/huggingface_hub.py
  • tests/integrations/huggingface_hub/test_huggingface_hub.py

Issues

AI integrations should not interfere with HTTP transactions.
Replace set_span_errored() with direct span.set_status() to avoid
propagating INTERNAL_ERROR to the containing HTTP transaction.

Fixes getsentry#5793

Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

huggingface_hub: Stop setting transaction status

2 participants